package jwdt.xadmin.bbs.bean;

import java.util.List;

import jwdt.common.util.CacheUtil;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;
import com.ezerg.fastjson.annotation.JSONField;

@Table(name="bbs_class", keys={"id"}, comment="")
public class TBclass implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	@Column(value="id", comment="")
	private Integer id;
	
	@Column(value="name", comment="")
	private String name;
	
	@Column(value="orders", comment="")
	private Integer orders;
	
	@Column(value="fid", comment="")
	private Integer fid;

	@Column(value="zt", comment="")
	private Integer zt;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getOrders() {
		return orders;
	}

	public void setOrders(Integer orders) {
		this.orders = orders;
	}

	public Integer getFid() {
		return this.fid;
	}
	
	public void setFid(Integer fid) {
		this.fid = fid;
	}
	
	
	public Integer getZt() {
		return zt;
	}

	public void setZt(Integer zt) {
		this.zt = zt;
	}

	@JSONField(serialize=false)
	@SuppressWarnings("rawtypes")
	public List getChildren() {
		return Jdb.get().query(TBclass.class, "fid=? and zt=1 ORDER BY orders", new Object[]{this.id}, CacheUtil.C0);
	}


}
